<template>
  <el-container direction="vertical" class="girl-wrapper">
    <div class="girl-header-banner">
      <img :src="girlBannerList.url" class="z-auto" alt="关于">
      <div class="girl-info">
        <div class="girl-name">妹纸</div>
        <div class="girl-number"><i class="el-icon-tickets"></i> {{girlDataSize}} 篇文章</div>
      </div>
    </div>
    <girl-table></girl-table>
  </el-container>
</template>

<script>
  import { getGirlList } from '../../../api/index'
  import GirlTable from '@/components/girl/GirlTableModule.vue'

  export default {
    name: 'Girl',
    components: {
      GirlTable
    },
    data () {
      return {
        page: 1,
        girlBannerList: {},
        girlDataSize: 0,
      }
    },
    mounted () {
      this.getGirlDataList()
    },
    methods: {
      getGirlDataList () {
        getGirlList({ page: this.page }).then(data => {
          if (data.status === 100) {
            this.girlDataSize = data.total_counts
            if (data.page === 1) {
              data.data.forEach((item, index) => {
                if (index <= 3) {
                  this.girlBannerList = item
                }
              })
            }
          }
        }).catch(error => {

        })
      },

    }
  }
</script>

<style lang="scss" ref="stylesheet/scss" scoped>
  .girl-wrapper {
    width: 100%;

    .girl-header-banner {
      position: relative;
      width: 100%;
      background: rgba(26, 16, 55, 0.5);
      height: 500px;

      img {
        object-fit: cover;
        opacity: 0.5;
        width: 100%;
        height: 500px;
      }

      .girl-info {
        width: 70%;
        height: 300px;
        display: inline-block;
        color: white;
        position: absolute;
        left: 30%;
        bottom: 0;

        .girl-name {
          text-align: left;
          font-size: 80px;
          text-shadow: 0 0 10px #fff,
          0 0 20px #fff,
          0 0 30px #fff,
          0 0 40px #A84F7E,
          0 0 70px #843E64,
          0 0 80px #562B46,
        }
        .girl-number {
          margin-top: 120px;
          margin-left: 40%;
        }
      }
    }
  }

</style>
